LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := game_shared

LOCAL_MODULE_FILENAME := libgame
LOCAL_CPP_EXTENSION := .cc .cpp
#LOCAL_SRC_FILES := hellocpp/main.cpp \
#	../../Classes/AppDelegate.cpp \
#	../../Classes/HelloWorldScene.cpp 
APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell find $(LOCAL_PATH)/../../Classes -path '*/.svn' -prune -o -type d -print))
LOCAL_SRC_FILES := $(filter %.c %.cpp, $(APP_SUBDIRS))
APP_SUBDIRS := $(filter-out %.c %.cpp, $(APP_SUBDIRS))
LOCAL_SRC_FILES += $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.cpp))))
LOCAL_SRC_FILES += $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.c))))
LOCAL_SRC_FILES += hellocpp/main.cpp                  
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes                   
LOCAL_C_INCLUDES += $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D)) 
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static cocos_lua_static
            
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,  $(LOCAL_PATH)/../../cocos2dx)
$(call import-module,CocosDenshion/android) 
$(call import-module,cocos2dx) 
$(call import-module,extensions)
$(call import-module,scripting/lua/proj.android)
